<div id="envolve">

<script type="text/javascript">
	$('#comprar').live('click', function(){
		$.get($('#comprar').attr("value"), function(data){
			$('#list-carrinho').html(data);
			$('.popup-carrinho-title').html('<h1>Dados da Entrega</h1>');
	    });
	});
</script>
		<div id="list-cart" style="width:900px; height: 330px;">
		<?php if ($this->shopping_cart != null):?>
			<div id="cart" style="width:900px; height: 330px; overflow: auto;">
			<table>
				<thead>
					<th width="100">
					</th>
					<th width="300" align="left">
						Descrição
					</th>
					<th width="150" align="left">
						Valor Unitário
					</th>
					<th width="150" align="left">
						Quantidade
					</th>
					<th width="100" align="left">
						Valor Total
					</th>
					<th width="20">
					</th>
				</thead>
				
				<tbody>
				<?php foreach ($this->shopping_cart as $cart):?>
					<tr height="50">
					
						<td>
						<img width="90" height="90" alt="" src="<?php echo $cart['image']?>">
						</td>
						<td width="300" align="left">
							<?php echo utf8_encode($cart["title"]) .' - '.$cart['name']?>
						</td>
						
						<td width="150" align="left">
							<?php echo 'R$' . number_format($cart['price'], 2, ',', '.')?>
						</td>
						
						<td width="150" align="left">
							<input id="qtd<?php echo $cart['id_cart']?>" value="<?php echo $cart['qtd']?>" size="3" > <a style="font-size: 12px; cursor: pointer;" onclick="alterQtd('/cart/alter-qtd/idCart/<?php echo $cart['id_cart']?>/qtd/', '<?php echo $cart['id_cart']?>')">atualizar</a>
						</td>
						
						<td width="100" align="left">
							<?php echo 'R$' . number_format($cart['price']*$cart['qtd'], 2, ',', '.')?>
						</td>
						<td>
							<a style="cursor: pointer;" onclick="deleteItem('/cart/delete-cart/idCart/<?php echo $cart['id_cart']?>')" ><img title="excluir" width="20" alt="excluir" src="../images/delete.png"></a>
						</td>
					</tr>
				<?php endforeach;?>
					 
				</tbody>
			</table>
			<?php else:?>
			<div class="info-carrinho">
				<p>Nenhum produto adicionado ao seu carrinho</p>
			</div>
			<?php endif;?>
		</div>
		
		<?php if ($this->shopping_cart != null):?>
		<div style="height: 50px; margin-top: 30px;">
			<div class="formLeft" style=" float: right">
				<div id="comprar" value="/cart/show-payment" style="width: 130px; height: 20px; background:white; margin-left: 10px; margin-top: 49px; cursor: pointer; color: #000">
					Comprar
				</div>
			</div>
			<div class="formLeft" style=" float: right">
				<div style="width: 130px; height: 20px; background:white;">
					<b style="color: #000; line-height: 18px; font-size: 16px">Total da Compra</b>
				</div>
				<div style="widows: 130px; height: 35px; padding-top: 10px; margin-top: 5px; background:white;">
					<b style="color: black; font-size: 30px; line-height: 15px; padding-left: 20px; font-family: amerika;">
						<?php echo 'R$'.number_format($this->price, 2, ',', '.')?>
					</b>
					<br />
					<b style="color: black; font-size: 15px; float: right;">+ frete</b>
				</div>
			</div>
		</div>
		<?php endif;?>
		</div>
</div>